<?php
class Commander
{
	private $_fpHandle = null;
	public function __construct(){
			
	}
	public function Connect(){
		$this->_fpHandle = @fsockopen(Yii::app()->params["CommandServer"], (int)Yii::app()->params["CommandPort"], $errno, $errstr, $timeout);
		if($errno>0){
			$this->_fpHandle = null;
			throw new Exception("Server Connect Time out");
		}
	}
	public function DisConnect(){
		if(is_resource($this->_fpHandle)) @fclose($this->_fpHandle);
		$this->_fpHandle = null;
	}
	public function SendCommand($Command){
	
	}
	public function GetResponse(){
		
	}
	protected function __error(){
	
	}
	public function __destruct(){
			
	}
}
?>